1. Field of the Invention
The present invention relates to a direction detecting apparatus and method for detecting a direction based on the earth magnetism to generate a direction signal corresponding to a moving direction of a movable body such as a vehicle and so forth.
2. Description of Prior Art
FIG. 1 is a block diagram showing a conventional direction detecting apparatus disclosed in, for example, a Japanese Patent Publication (Kokoku) No. 3-19929. In the figure, reference numeral 1 is an earth magnetic sensor, mounted on a vehicle, for detecting the earth magnetism, 11 is an excited coil wound on a not-shown magnetic core of the earth magnetic sensor and excited by an exciting frequency f, 12 is an X-side secondary coil wound on the outer periphery of the magnetic core, and 13 is a Y-side secondary coil orthogonal to the X-side secondary coil 12 and wound on the magnetic core. Reference numeral 2 is an exciting circuit for supplying an exciting signal of the exciting frequency f to the excited coil 11 of the magnetic sensor. 3.sub.X and 3.sub.Y are band-pass filters for amplifying signals of even number order of frequencies, 4.sub.X and 4.sub.Y are direct-current amplifiers for rectifying the output signals from the band-pass filters 3.sub.X and 3.sub.Y for direct-current amplification, and 5.sub.X and 5.sub.Y are A/D converters for converting the output voltages from the direct-current amplifiers 4.sub.X and 4.sub.Y into digital signals.
Reference numeral 6 is a microcomputer for calculating an angle between the moving direction of the vehicle which is mounting the A/D converters 5.sub.X and 5.sub.Y and the horizontal component of the earth magnetism, based on the output signals from the A/D converters 5.sub.X and 5.sub.Y, and 61 is calculating means, realized by software in the microcomputer 6, for calculating the above-mentioned angle. Reference symbols 7.sub.X and 7.sub.Y are D/A converters for converting digital signals, outputted from the microcomputer 6, for correcting the magnetization of the vehicle , into analog signals, 8.sub.X and 8.sub.Y are voltage/current converters for outputting currents proportional to the input voltages from the D/A converters 7.sub.X and 7.sub.Y into an X-side secondary coil 12 and a Y-side secondary coil 13 in the earth magnetic sensor 1 to generate magnetic field to cancel the amount of the magnetization. 9 is a display circuit for displaying the moving direction of the vehicle based on the result of the calculation in the calculating means 61 in the microcomputer 6.
Next, the operation will be described. When the earth magnetic sensor 1 such as the one as mentioned above is mounted in the vehicle, it is influenced by the magnetization of the car body. The magnetization of the car body always accompanies with fluctuation due to its change in time or forcible magnetization by an external environment. Therefore, corrections for removing the influences due to the magnetization (hereinafter referred to as magnetization correction) must be effected frequently. When the amount of magnetization of the car body is changed to constitute a hindrance in displaying the direction, if an alarm is displayed to prompt the correction of the magnetization, a bad effect caused by believing the error display as it is can be avoided, and unnecessary correction is not effected when the display is correct, so that an efficient magnetization correction can be performed.
In the following, the operation of such a magnetization correction as mentioned above will be described. In FIG. 1, at the Y-side secondary coil 13 and the X-side secondary coil 12 in the earth magnetic sensor 1, voltages e.sub.X and e.sub.Y given by the following equations are generated. EQU e.sub.X =KHcos.theta. (1) EQU e.sub.Y =KHsin.theta. (2)
Here, K is a constant, H is a horizontal component of the earth magnetism, .theta. is an angle between the horizontal component of the earth magnetism and the X-side secondary coil 12. When there is no influence due to the magnetization of the car body, the locus of the output signals V.sub.X and V.sub.Y, when the vehicle is rotated one time, is a circle having its center at the origin 0 as illustrated in FIG. 9 by a dash line. Accordingly, when the voltages e.sub.X and e.sub.Y can be determined, the angle .theta. can be calculated based on the above-mentioned equations (1) and (2) so that the moving direction of the vehicle can be obtained.
When there is a magnetic field vector due to the magnetization of the car body, however, the locus of the output signals V.sub.X and V.sub.Y when the vehicle is rotated one time is a circle having its center at a point P different from the origin 0 as illustrated in FIG. 2 by a continuous line. The center P of the circle is moved in the direction of the magnetic field vector due to the magnetization of the car body in proportion to its amount. The magnetic field vector OP due to the magnetization of the car body shown in FIG. 2 is expressed by an X-axis component V.sub.XO and a Y-axis component V.sub.YO. Assuming that the values of the output signals V.sub.Y and V.sub.X at the Y axis and the X axis when the vehicle is rotated one time are V.sub.A, V.sub.B, V.sub.C, and V.sub.D, then the Y-axis component V.sub.YO and the X-axis component V.sub.XO can be determined by the following equations. EQU V.sub.YO =(V.sub.A +V.sub.B)/2 (3) EQU V.sub.XO =(V.sub.C +V.sub.D)/2 (4)
Namely, when the vehicle is rotated, the microcomputer 6 detects the values V.sub.A, V.sub.B, V.sub.C, and V.sub.D as digital values to execute the calculations of the above equations, thereby it is possible to obtain the amounts of the magnetization V.sub.YO and V.sub.XO. When the amounts of the magnetization V.sub.YO and V.sub.XO exceed a predetermined value, it is judged that the angle error a is too large so that an alarm signal is output to the display circuit 9 to display an alarm.
Since the conventional direction detecting apparatus is constructed as described above, there were problems in that at least one rotation of the vehicle is necessary to calculate the amount of the magnetization of the car body and to display an alarm when the angle error is judged to be large, and since the data at particular points, namely the values at the X section or the Y section of the locus of the circle, are necessary, if the locus of the circle of the output signals V.sub.X and V.sub.Y when the vehicle is rotated one time does not intersect the X axis or the Y axis, there is no X section V.sub.C or V.sub.D or Y section V.sub.A or V.sub.B, so that the amount of the magnetization V.sub.YO or V.sub.XO cannot be calculated.